<?php
    function dbConnect(){
        $dsn = 'mysql:dbname=diary_db;host=localhost;charset=utf8';
        $username = 'root';
        $password = '';
        $dbh = new PDO($dsn,$username,$password);
        return $dbh;
    }
?>